﻿<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="PolicyList.aspx.cs"
    Inherits="iOak.Web.Administration.PolicyList" %>

<%@ Register Src="~/Modules/PagerControl.ascx" TagName="PagerControl" TagPrefix="iOak" %>
<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
    <script type="text/javascript">

        $(document).ready(function () {
            $('#<%=btnCreate.ClientID %>').bind('click', function () {
                window.location = "PolicyDetails.aspx";
                return false;
            });
        });

        function modifyClick(id) {
            location.href = "PolicyDetails.aspx?policyId=" + id;
        }

        function deleteClick(id) {
            jConfirm("是否确定删除？", function () {
                doPostBack("delete", id);
            });
        }

        function doPostBack(name, args) {
            $('#<%=hidEventName.ClientID %>').val(name);
            $('#<%=hidEventArguments.ClientID %>').val(args);
            $('#<%=btnPostBack.ClientID %>').click();
        }

    </script>
    <div class="content">
        <div class="left_bar">
            <div class="left_menu">
                <div class="left_menu_top">
                    搜索
                </div>
                <div class="sub_menu">
                    <table style="padding: 10px">
                        <tr>
                            <td>
                                政策名称<br />
                                <asp:TextBox runat="server" ID="txtSubject"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                关键字<br />
                                <asp:TextBox runat="server" ID="txtDescription"></asp:TextBox>
                            </td>
                        </tr>
                        <tr>
                            <td>
                                <br />
                                <asp:Button runat="server" ID="btnFind" Text="搜索" OnClick="btnFind_Click" CssClass="adminButtonBlue" />
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
        <div class="right_bar">
            <div class="right_content">
                <table width="100%" border="0" cellspacing="0" cellpadding="0" style="background-color: #fff;">
                    <tr>
                        <td width="7" align="left" valign="top">
                            <img src="/images/tab-j_01.jpg" width="7" height="7" />
                        </td>
                        <td>
                            <div class="now-pac">
                                您现在的位置：<a href="#">人才申报</a> &gt; 申报</div>
                        </td>
                        <td width="7" align="right" valign="top">
                            <img src="/images/tab-j_02.jpg" width="7" height="7" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            <div style="border: 1px solid #ccc">
                                <div style="border: 1px solid #fff">
                                    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="tab1">
                                        <tr>
                                            <td>
                                                <div class="table-header" style="position: relative">
                                                    <div class="table-header_name" style="float: left">
                                                        人才政策</div>
                                                    <div style="float: right; padding-right: 10px; padding-top: 8px">
                                                        <asp:Button runat="server" ID="btnCreate" Text="创建人才政策" CssClass="adminButtonBlue" />
                                                    </div>
                                                </div>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <asp:GridView runat="server" ID="gvPolicy" Width="100%" AutoGenerateColumns="false"
                                                    OnRowDataBound="gvPolicy_RowDataBound" CssClass="tab1">
                                                    <HeaderStyle CssClass="tab1_green" />
                                                    <RowStyle CssClass="itemRow" />
                                                    <AlternatingRowStyle CssClass="alternatingRow" />
                                                    <Columns>
                                                        <asp:TemplateField HeaderText="No." ItemStyle-HorizontalAlign="Right" ItemStyle-Width="15px">
                                                            <ItemTemplate>
                                                                <%# gvPolicy.PageIndex * gvPolicy.PageSize + Container.DisplayIndex+1 %>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField HeaderText="名称" DataField="Subject" ItemStyle-HorizontalAlign="Left" />
                                                        <asp:TemplateField HeaderText="模板名称" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="170px">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblResumeTemplateName"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:TemplateField HeaderText="发布者" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px">
                                                            <ItemTemplate>
                                                                <asp:Label runat="server" ID="lblPublishBy"></asp:Label>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                        <asp:BoundField HeaderText="发布日期" DataField="PublishedOn" ItemStyle-Width="70px" />
                                                        <asp:TemplateField HeaderText="操作" ItemStyle-Width="40px">
                                                            <ItemTemplate>
                                                                <asp:Image runat="server" ID="imgOptionMenu" ImageUrl="~/Images/opetionMenu.gif"
                                                                    onclick="$('.optionMenu').show()" Style="cursor: pointer" />
                                                                <ajaxToolkit:PopupControlExtender ID="PopupControlExtender2" runat="server" TargetControlID="imgOptionMenu"
                                                                    PopupControlID="pnlOptionMenu" Position="Bottom" />
                                                                <asp:Panel ID="pnlOptionMenu" runat="server" Style="display: none">
                                                                    <div class="optionMenu">
                                                                        <asp:PlaceHolder ID="phModify" runat="server">
                                                                            <div onclick="$('.optionMenu').hide();modifyClick('<%#DataBinder.Eval(Container.DataItem, "Policyid") %>');">
                                                                                修改
                                                                            </div>
                                                                        </asp:PlaceHolder>
                                                                        <asp:PlaceHolder ID="phDelete" runat="server">
                                                                            <div onclick="$('.optionMenu').hide();deleteClick('<%#DataBinder.Eval(Container.DataItem, "Policyid") %>')">
                                                                                删除
                                                                            </div>
                                                                        </asp:PlaceHolder>
                                                                    </div>
                                                                </asp:Panel>
                                                            </ItemTemplate>
                                                        </asp:TemplateField>
                                                    </Columns>
                                                </asp:GridView>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td>
                                                <iOak:PagerControl runat="server" ID="pagerControl" PageIndexChange="pagerControl_PageIndexChange">
                                                </iOak:PagerControl>
                                            </td>
                                        </tr>
                                    </table>
                                </div>
                            </div>
                        </td>
                    </tr>
                </table>
            </div>
        </div>
    </div>
    <asp:Button runat="server" ID="btnPostBack" CssClass="hidden" OnClick="btnPostBack_Click" />
    <asp:HiddenField runat="server" ID="hidEventName" />
    <asp:HiddenField runat="server" ID="hidEventArguments" />
</asp:Content>
